package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 预警列表
 *
 * @author ruoyi
 */
@Data
@ApiModel("预警列表")
public class SysAlert implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "预警ID", required = true)
    private Long id;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "设备ID")
    private Long deviceId;

    @ApiModelProperty(value = "预警级别（0低 1中 2高）", required = true)
    private String alertLevel;

    @ApiModelProperty(value = "预警状态（0 - 正在预警 1 - 已解决）", required = true)
    private String alertStatus;

    @ApiModelProperty(value = "预警内容", required = true)
    private String alertContent;

    @ApiModelProperty(value = "预警时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date alertTime;

    @ApiModelProperty(value = "恢复时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date recoveryTime;

    @ApiModelProperty(value = "心率")
    private String heartRate;

    @ApiModelProperty(value = "血压")
    private String bloodPressure;

    @ApiModelProperty(value = "血氧值")
    private String bloodOxygen;

    @ApiModelProperty(value = "经纬度")
    private String location;

    @ApiModelProperty(value = "产生预警的数据ID")
    private String dataId;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "预警配置ID")
    private Long alertConfigId;
}